<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>拼接字符串</title>
    <script>
        // var a = 'hello' + 'world' + '哈哈' + '嘿嘿';
        /*var a = '<html>' +
                '<head>' +
                '<meta charset="UTF-8">' +
                '<title>这是一个网页</title>' +
                '</head>' +
                '<body>' +
                '<h1>这是一级标题</h1>' +
                '</body>' +
                '</html>'*/
            //反引号可以换行写
            /*a = `
                哈哈哈哈
                今天天气很好
                啦啦啦
                `*/


        // console.log(a);
        var b = 10;
        console.log('b = '+ b);
        console.log('b =', b);
        console.log(`b = ${b}`);
        //在模板字符串中可以直接使用变量
        var c = `hello hello ${b}`;
        console.log(c);



    </script>

</head>
<body>

</body>
</html>